package com.tangkuo.study.design.strategy;

import org.springframework.stereotype.Service;

/**
 * 策略
 * 
 * @author tangkuo
 *
 */
@Service
public class VipDiscountStrategy implements DiscountStrategy{

	@Override
	public String type() {
		return "vip";
	}

	@Override
	public double discount(double cost) {
		return cost * 0.96;
	}

}
